package com.hdax.dm.mapstructs;

import com.hdax.dm.dtos.user.UserDto;
import com.hdax.dm.entity.user.DmUser;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public abstract class UserDtoMapper {

    @Mappings({
            @Mapping(target = "userId",source = "id")
    })
    public abstract UserDto toTarget(DmUser source);
    public abstract List<UserDto> toTargetList(List<DmUser> sources);
}
